/**************************************************************
 *@ProjectName: blweibo
 *@FileName: PopupService.java
 *@Date: 2011-5-31
 *@Copyright: 2011 www.hrbanlv.com Inc. All rights reserved.
 **************************************************************/
package com.zhiweibo;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;

/**
 * The Class PopupService.
 * 
 * @author SunHaibin
 * @since Android 1.6
 * @history 2011-5-31
 */
public class PopupService extends Service {
    
    /** The helper. */
    private PopupServiceHelper helper;

    /**
     * Gets the helper.
     * 
     * @return the helper
     */
    private PopupServiceHelper getHelper() {
        if (helper == null) {
            helper = new PopupServiceHelper(getApplicationContext());
        }
        return helper;
    }

    /* (non-Javadoc)
     * @see android.app.Service#onBind(android.content.Intent)
     */
    @Override
    public IBinder onBind(Intent paramIntent) {
        return null;
    }

    /* (non-Javadoc)
     * @see android.app.Service#onCreate()
     */
    @Override
    public void onCreate() {
        super.onCreate();
        getHelper();
    }

    /* (non-Javadoc)
     * @see android.app.Service#onStart(android.content.Intent, int)
     */
    @Override
    public void onStart(Intent paramIntent, int paramInt) {
        super.onStart(paramIntent, paramInt);
        helper.postNotificationNewVersion();
        stopSelf();
    }
}